import request from '@/utils/request'

export function getUserList(data: any) {
  return request({
    url: '/oaUser/listByEntity',
    method: 'post',
    data: data,
  })
}

export function addUser(data: any) {
  return request({
    url: '/oaUser/save',
    method: 'post',
    data: data,
  })
}

export function updateUser(data: any) {
  return request({
    url: '/oaUser/update',
    method: 'post',
    data: data,
  })
}
export function queryUserRoleList() {
  return request({
    url: '/sysRole/getRoleByUserId',
    method: 'get',
  })
}

export function delUser(data: any) {
  return request({
    url: '/oaUser/removeByIds',
    method: 'get',
    params: data,
  })
}

export function resetPwd(data: any) {
  return request({
    url: '/userManage/resetPwd',
    method: 'post',
    data: data,
  })
}
export function getUserInfo(params: any) {
  return request({
    url: '/oaUser/findById',
    method: 'get',
    params,
  })
}
export function updatePwd(data: any) {
  return request({
    url: '/oaUser/updateInfo',
    method: 'post',
    data: data,
  })
}
